<template>
  <div class="fsc drop-down">
    <div class="select-name">盘点批次：</div>
    <div class="pr">
      <v-select
        :items="items"
        v-model="chooseBatch"
        label="请选择"
        solo
        @change="change"
      ></v-select>
    </div>
    <!-- <div class="btn" @click="search">查询</div> -->
  </div>
</template>

<script>
export default {
  data(){
    return {
      items: [],
      chooseBatch:'',
      data:null
    }
  },
  methods:{
    getItems(){
      this.$http.get('/api/StocktakingAccountReport/BatchNumberList')
        .then(res=>{
  
          this.data=res
          this.items=res
           
          this.chooseBatch=this.items[0]
          this.change(this.items[0])
          this.$forceUpdate()
        })
    },
    change(e){
      const chooseBatch=e
      this.$emit('change',chooseBatch)
    },
    search(){
      this.$emit('search')
    }
  },
  mounted(){
    this.getItems()
  },

}
</script>

<style scoped>
  .drop-down{
    height: 32px;
  }
  .select-name{
    font-size: 14px;
    font-family: Microsoft YaHei, Microsoft YaHei-Regular;
    font-weight: 400;
    text-align: LEFT;
    color: #d6e2ff;
    line-height: 14px;
  }
  .btn{
    width: 60px;
    height: 32px;
    font-size: 14px;
    font-family: Microsoft YaHei, Microsoft YaHei-Regular;
    font-weight: 400;
    text-align: CENTER;
    color: #ffffff;
    line-height: 32px;
    background: #1890ff;
    border-radius: 2px;
    box-shadow: 0px 2px 0px 0px rgba(0,0,0,0.04); 
    cursor: pointer;
  }
  ::v-deep .v-text-field{
    border-bottom: none;
  }
  ::v-deep .theme--light.v-label{
    font-size: 14px;
    color: rgba(255,255,255,0.48);
  }
  ::v-deep .theme--light.v-icon{
    color: rgba(255,255,255,0.48);
  }
  ::v-deep .v-input__control{
    min-height: 32px !important;
    max-height: 32px;
    height: 32px;
  }
  ::v-deep .theme--light.v-text-field--solo > .v-input__control > .v-input__slot{
    background: rgba(35,144,215,0.20);
    border: 1px solid rgba(35,144,215,0.30);
    border-radius: 2px;
    font-size: 14px;
    color: rgba(255,255,255,0.48);
  }
 
  ::v-deep .v-select__selection--comma{
    color: #fff;
  }
  .v-input{
    width: 202px;
    margin-right: 10px;
  }
</style>